<?php
/*
 * @Author: an
 * @Date: 2021/12/9
 * @Description: 直播流地址记录表
 */


namespace App\Models;


class ImLiveStreamLogs extends BaseModel
{
    protected $table = 'im_live_stream_logs';

    /**
     * 推流地址添加记录
     * @param $userId 用户ID
     * @param $channel 来源：ali 阿里云 tencent 腾讯
     * @param $appName 自定义应用名
     * @param $streamName 自定义流名称
     * @param $url 生成的地址
     * @param $expiredAt 过期时间
     * @author an
     * @time 2021-12-09 17:08
     */
    public function create($userId, $channel, $appName, $streamName, $url, $expiredAt)
    {
        $this->user_id = $userId;
        $this->channel = $channel;
        $this->app_name = $appName;
        $this->stream_name = $streamName;
        $this->url = $url;
        $this->expired_at = $expiredAt;
        $this->save();
    }
}
